#include "MessageRotationTimer.h"

use_logging_cpp(MessageRotationTimer)

MessageRotationTimer::MessageRotationTimer( AribaNode* _parent )
	 : app(_parent)
{
	right = 0;
	left = 0;
}

MessageRotationTimer::~MessageRotationTimer(){
}

void MessageRotationTimer::eventFunction()
{
	app->MessageRotationTimerEvent();
}

bool MessageRotationTimer::getRightFlag()
{
	return right;
}
bool MessageRotationTimer::getLeftFlag()
{
	return left;
}

void MessageRotationTimer::setRightFlag(bool _right)
{
	right = _right;
}

void MessageRotationTimer::setLeftFlag(bool _left)
{
	left = _left;
}

//bool rightLeft (1 == right, 0 == left)
bool MessageRotationTimer::isFlagSet(bool rightLeft)
{
	if(rightLeft)
		return right;
	else
		return left;
}

//bool rightLeft (1 == right, 0 == left)
void MessageRotationTimer::setFlag(bool rightLeft)
{
	if(rightLeft)
		right = 1;
	else
		left = 1;
}

//return (1 == right, 0 == left)
bool MessageRotationTimer::getFlag()
{
	if(right)
		return 1;
	else
		return 0;
}

void MessageRotationTimer::clearFlag(bool rightLeft)
{
	if(rightLeft)
		right = 0;
	else
		left = 0;
}
